
--[[
	**********************
	* SvFrame - thomasfn *
	**********************
	time.lua - Loads basic time functionality
]]

function PLUGIN:InitTime()
	svr.AddFlag( "time" )
	
	self:Command( "settime", self.SetTime, { FLAG_TIME }  )
end

table.insert( PLUGIN.Inits, PLUGIN.InitTime )

function PLUGIN:SetTime( ply, args )
	if (not svr.CheckArg( args, 1, "number")) then return ply:ChatPrint( colour.White, "Syntax: /settime <number>" ) end
	svr.ChatPrint( nil, ply:Name(), " has set the time to ", colour.Green, args[1], colour.White, "." )
	local world = server.GetWorld(0)
	world.Time(tonumber(args[1]))
end